const logMiddleware = async (ctx, next) => {
    const { request, host } = ctx
    const { url, method } = request

    console.log('\x1B[36m%s\x1B[0m', '<-----------------------------')
    console.log(`[${method}]: ` ,host, url)
    console.log('\x1B[36m%s\x1B[0m', '----------------------------->\n')


    await next()
}

module.exports = logMiddleware